package com.baosight.risk.service.workflow.impl;

import com.baosight.risk.api.workflow.WorkflowAuthService;
import com.baosight.risk.mapper.workflow.WorkflowAuthMapper;
import com.baosight.risk.service.workflow.entity.WorkflowAuth;
import com.baosight.risk.service.workflow.vo.WorkflowAuthVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WorkflowAuthServiceImpl implements WorkflowAuthService {

    @Autowired
    private WorkflowAuthMapper workflowAuthMapper;

    @Override
    public List<WorkflowAuthVO> queryAll(String filed) {
        return workflowAuthMapper.queryAll(filed);
    }

    @Override
    public List<WorkflowAuthVO> selectNodes(String processKey) {
        return workflowAuthMapper.selectNodes(processKey);
    }

    @Override
    public Integer insert(WorkflowAuth workflowAuth) {
        return workflowAuthMapper.insert(workflowAuth);
    }

    @Override
    public WorkflowAuthVO selectAuthByProcessKey(String processKey, String nodeKey) {
        return workflowAuthMapper.selectAuthByProcessKey(processKey, nodeKey);
    }

}
